<template>
  <div>
    <el-dialog
      :title="i18n.t('shangChuanTuPian')"
      :visible.sync="visible"
      width="950px"
      :modal="booleanVal"
      append-to-body
      :before-close="handleClose"
    >
      <upload-picture v-if="visible" :is-more="isMore" :model-name="modelName" @getImage="getImage" />
    </el-dialog>
  </div>
</template>

<script>
import i18n from '../../../lang'
import UploadPicture from '../base/uploadPicture'
export default {
  name: 'UploadFroms',
  components: { UploadPicture },
  data() {
    return {
      visible: false,
      callback: function() {},
      isMore: '',
      modelName: '',
      ISmodal: false,
      booleanVal: false,
      i18n: i18n
    }
  },
  watch: {
    // show() {
    //   this.visible = this.show
    // }
  },
  methods: {
    handleClose() {
      this.visible = false
    },
    getImage(img) {
      this.callback(img)
      this.visible = false
    }
  }
}
</script>

<style scoped></style>
